<?php
session_start();
require "lib/db.php";
require "lib/product-function.php";
require "lib/category-function.php";
require "lib/subcategory-function.php";

if(isset($_GET['subCategoryID'])){
	$subCategoryID = $_GET['subCategoryID'];
	$listproduct = getListProductBySubCategoryID($subCategoryID);
	echo '<option value="0">--Choose--</option>';
	if(mysql_num_rows($listproduct)==0){
		echo '<option value="0">Empty</option>';
	}else{
		while($product = mysql_fetch_array($listproduct)){
			echo '<option value="'.$product['ProductID'].'">'.$product['ProductName'].'</option>';
		}
	}
}
?>